use serde::{Serialize, Deserialize};

#[derive(Debug, Deserialize, Serialize)]
pub struct ProcessDefinition {
    pub id: String, // 流程定义的ID (名称+版本号)
    pub name: Option<String>,
    pub process: Process,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct Process {
    pub id: String,
    pub name: Option<String>,
    pub nodes: Vec<Node>,
    pub sequenceFlow: Vec<SequenceFlow>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct SequenceFlow {
    pub id: String,
    pub name: Option<String>,
    pub sourceRef: String,
    pub targetRef: String,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct Node {
    pub id: String,
    pub name: Option<String>,
    pub type_: String,
}